package org.kernely.ui.services;

import java.util.List;



/**
 * Provides all bundle management methods
 */
public interface KernelyUIBundleService {
	
	/**
	 * Add a bundle which have UI content into the application.
	 * @param module The bundle to add.
	 */
	void registerModule(KernelyUIBundle module);
	
	/**
	 * Remove a bundle which have UI content  from the application.
	 * @param module The bundle to remove.
	 */
	void unregisterModule(KernelyUIBundle module);
	
	/**
	 * Returns the list of bundles with a user interface detected in the application.
	 * @return The list of the bundles.
	 */
	List<KernelyUIBundle> getUIBundles();
	
	/**
	 * Add a listener to the application.
	 * @param listener The listener to add.
	 */
	void addListener(KernelyUIBundleServiceListener listener);
	
	/**
	 * Removes a listener from the application.
	 * @param listener The listener to remove.
	 */
	void removeListener(KernelyUIBundleServiceListener listener);	
}

